package array;

public class ArrayExpand2 {
  public static void main(String args[]){
	  int[] a = new int[2];
	  a[0] = 10;
	  a[1] = 20;

	  int[] b = new int[a.length*2];
	
	  // a[] -- copy -- b[]
	  System.arraycopy(a, 0, b, 0, a.length);
	  
	  a=b;
	  
	  print(a);
	
  }
  
  public static void print(int[] a){
	  for(int i=0;i<a.length;i++){
		  System.out.println(a[i]);
	  }
  }
  
  
}
